package com.otom.bcel;

public class ConverterUtils {
	public static String intToString(int value) {
		return String.valueOf(value);
	}

	public static String floatToString(float value) {
		return String.valueOf(value);
	}

	public static String doubleToString(double value) {
		return String.valueOf(value);
	}

	public static String charToString(char value) {
		return String.valueOf(value);
	}

	public static String booleanToString(boolean value) {
		return String.valueOf(value);
	}

	public static String longToString(long value) {
		return String.valueOf(value);
	}
	
	public static String shortToString(short value) {
		return String.valueOf(value);
	}

	public static String byteToString(byte value) {
		return String.valueOf(value);
	}
	
	public static byte StringTobyte(String value) {
		if (value == null) {
			return 0;
		}
		return Byte.parseByte(value);
	}
	
	public static short StringToshort(String value) {
		if (value == null) {
			return 0;
		}
		return Short.parseShort(value);
	}

	public static int StringToint(String value) {
		if (value == null) {
			return 0;
		}
		return Integer.parseInt(value);
	}

	public static float StringTofloat(String value) {
		if (value == null) {
			return 0;
		}
		return Float.parseFloat(value);
	}

	public static double StringTodouble(String value) {
		if (value == null) {
			return 0;
		}
		return Double.parseDouble(value);
	}

	public static boolean StringToboolean(String value) {
		if (value == null) {
			return false;
		}
		return Boolean.parseBoolean(value);
	}

	public static long StringTolong(String value) {
		if (value == null) {
			return 0;
		}
		return Long.parseLong(value);
	}

	public static char StringTochar(String value) {
		return value.charAt(0);
	}

	public static Integer intToInteger(int value) {
		return Integer.valueOf(value);
	}

	public static Float floatToFloat(float value) {
		return Float.valueOf(value);
	}

	public static Double doubleToDouble(double value) {
		return Double.valueOf(value);
	}

	public static Character charToCharacter(char value) {
		return Character.valueOf(value);
	}

	public static Boolean booleanToBoolean(boolean value) {
		return Boolean.valueOf(value);
	}

	public static Long longToLong(long value) {
		return Long.valueOf(value);
	}
	
	public static Short shortToShort(short value) {
		return Short.valueOf(value);
	}
	
	public static Byte byteToByte(byte value) {
		return Byte.valueOf(value);
	}

	public static int IntegerToint(Integer value) {
		if (value == null) {
			return 0;
		}
		return value.intValue();
	}

	public static float FloatTofloat(Float value) {
		if (value == null) {
			return 0;
		}
		return value.floatValue();
	}

	public static double DoubleTodouble(Double value) {
		if (value == null) {
			return 0;
		}
		return value.doubleValue();
	}

	public static boolean BooleanToboolean(Boolean value) {
		if (value == null) {
			return false;
		}
		return value.booleanValue();
	}

	public static long LongTolong(Long value) {
		if (value == null) {
			return 0;
		}
		return value.longValue();
	}

	public static char CharacterTochar(Character value) {
		if (value == null) {
			return 0;
		}
		return value.charValue();
	}

	public static short ShortToshort(Short value) {
		if (value == null) {
			return 0;
		}
		return value.shortValue();
	}
	
	public static byte ByteTobyte(Byte value) {
		if (value == null) {
			return 0;
		}
		return value.byteValue();
	}
	
	public static String IntegerToString(Integer value) {
		if (value == null) {
			return null;
		}
		return String.valueOf(value.intValue());
	}

	public static String FloatToString(Float value) {
		if (value == null) {
			return null;
		}
		return String.valueOf(value.floatValue());
	}

	public static String DoubleToString(Double value) {
		if (value == null) {
			return null;
		}
		return String.valueOf(value.doubleValue());
	}

	public static String CharacterToString(Character value) {
		if (value == null) {
			return null;
		}
		return String.valueOf(value.charValue());
	}

	public static String BooleanToString(Boolean value) {
		if (value == null) {
			return null;
		}
		return String.valueOf(value.booleanValue());
	}

	public static String LongToString(Long value) {
		if (value == null) {
			return null;
		}
		return String.valueOf(value.longValue());
	}
	
	public static String ByteToString(Byte value) {
		if (value == null) {
			return null;
		}
		return String.valueOf(value.longValue());
	}
	
	public static String ShortToString(Short value) {
		if (value == null) {
			return null;
		}
		return String.valueOf(value.longValue());
	}

	public static Byte StringToByte(String value) {
		if (value == null) {
			return null;
		}
		return Byte.valueOf(value);
	}
	
	public static Short StringToShort(String value) {
		if (value == null) {
			return null;
		}
		return Short.valueOf(value);
	}
	
	public static Integer StringToInteger(String value) {
		if (value == null) {
			return null;
		}
		return Integer.valueOf(value);
	}

	public static Float StringToFloat(String value) {
		if (value == null) {
			return null;
		}
		return Float.valueOf(value);
	}

	public static Double StringToDouble(String value) {
		if (value == null) {
			return null;
		}
		return Double.valueOf(value);
	}

	public static Boolean StringToBoolean(String value) {
		if (value == null) {
			return null;
		}
		return Boolean.valueOf(value);
	}

	public static Long StringToLong(String value) {
		if (value == null) {
			return null;
		}
		return Long.valueOf(value);
	}

	public static Character StringToCharacter(String value) {
		if (value == null) {
			return null;
		}
		return new Character(value.charAt(0));
	}

	public static Integer CharacterToInteger(Character value) {
		if (value == null) {
			return null;
		}
		return new Integer(value.charValue());
	}
	
	public static Float CharacterToFloat(Character value) {
		if (value == null) {
			return null;
		}
		return new Float(value.charValue());
	}
	
	public static Byte CharacterToByte(Character value) {
		if (value == null) {
			return null;
		}
		return new Byte((byte)value.charValue());
	}
	
	public static Short CharacterToShort(Character value) {
		if (value == null) {
			return null;
		}
		return new Short((short)value.charValue());
	}
	
	public static Double CharacterToDouble(Character value) {
		if (value == null) {
			return null;
		}
		return new Double(value.charValue());
	}
	
	public static Long CharacterToLong(Character value) {
		if (value == null) {
			return null;
		}
		return new Long(value.charValue());
	}
	
	
	public static Character IntegerToCharacter(Integer value) {
		if (value == null) {
			return null;
		}
		return new Character((char)value.intValue());
	}
	
	public static Float IntegerToFloat(Integer value) {
		if (value == null) {
			return null;
		}
		return new Float(value.intValue());
	}
	
	public static Long IntegerToLong(Integer value) {
		if (value == null) {
			return null;
		}
		return new Long(value.intValue());
	}
	
	public static Double IntegerToDouble(Integer value) {
		if (value == null) {
			return null;
		}
		return new Double(value.intValue());
	}
	
	public static Character FloatToCharacter(Float value) {
		if (value == null) {
			return null;
		}
		return new Character((char)value.floatValue());
	}
	
	public static Integer FloatToInteger(Float value) {
		if (value == null) {
			return null;
		}
		return new Integer(value.intValue());
	}
	
	public static Long FloatToLong(Float value) {
		if (value == null) {
			return null;
		}
		return new Long(value.longValue());
	}
	
	public static Double FloatToDouble(Float value) {
		if (value == null) {
			return null;
		}
		return new Double(value.floatValue());
	}
	
	public static Character DoubleToCharacter(Double value) {
		if (value == null) {
			return null;
		}
		return new Character((char)value.doubleValue());
	}
	
	public static Character ByteToCharacter(Byte value) {
		if (value == null) {
			return null;
		}
		return new Character((char)value.byteValue());
	}
	
	public static Character ShortToCharacter(Short value) {
		if (value == null) {
			return null;
		}
		return new Character((char)value.shortValue());
	}
	
	public static Integer DoubleToInteger(Double value) {
		if (value == null) {
			return null;
		}
		return new Integer(value.intValue());
	}
	
	public static Integer ByteToInteger(Byte value) {
		if (value == null) {
			return null;
		}
		return new Integer(value.byteValue());
	}
	
	public static Integer ShortToInteger(Short value) {
		if (value == null) {
			return null;
		}
		return new Integer(value.shortValue());
	}
	
	public static Long DoubleToLong(Double value) {
		if (value == null) {
			return null;
		}
		return new Long(value.longValue());
	}
	
	public static Long ByteToLong(Byte value) {
		if (value == null) {
			return null;
		}
		return new Long(value.byteValue());
	}
	
	public static Long ShortToLong(Short value) {
		if (value == null) {
			return null;
		}
		return new Long(value.shortValue());
	}
	
	public static Float DoubleToFloat(Double value) {
		if (value == null) {
			return null;
		}
		return new Float(value.floatValue());
	}
	
	public static Float ByteToFloat(Byte value) {
		if (value == null) {
			return null;
		}
		return new Float(value.byteValue());
	}
	
	public static Float ShortToFloat(Short value) {
		if (value == null) {
			return null;
		}
		return new Float(value.shortValue());
	}
	
	public static Character LongToCharacter(Long value) {
		if (value == null) {
			return null;
		}
		return new Character((char)value.longValue());
	}
	
	public static Integer LongToInteger(Long value) {
		if (value == null) {
			return null;
		}
		return new Integer(value.intValue());
	}
	
	public static Float LongToFloat(Long value) {
		if (value == null) {
			return null;
		}
		return new Float(value.longValue());
	}
	
	public static Double LongToDouble(Long value) {
		if (value == null) {
			return null;
		}
		return new Double(value.longValue());
	}
	
	public static Double ByteToDouble(Byte value) {
		if (value == null) {
			return null;
		}
		return new Double(value.byteValue());
	}
	
	public static Short ByteToShort(Byte value) {
		if (value == null) {
			return null;
		}
		return new Short(value.byteValue());
	}
	
	public static Double ShortToDouble(Short value) {
		if (value == null) {
			return null;
		}
		return new Double(value.shortValue());
	}
	
	public static Byte ShortToByte(Short value) {
		if (value == null) {
			return null;
		}
		return new Byte((byte)value.shortValue());
	}
	
	public static Byte LongToByte(Long value) {
		if (value == null) {
			return null;
		}
		return new Byte((byte)value.longValue());
	}
	
	public static Short LongToShort(Long value) {
		if (value == null) {
			return null;
		}
		return new Short((short)value.longValue());
	}
	
	public static Byte IntegerToByte(Integer value) {
		if (value == null) {
			return null;
		}
		return new Byte((byte)value.intValue());
	}
	
	public static Short IntegerToShort(Integer value) {
		if (value == null) {
			return null;
		}
		return new Short((short)value.intValue());
	}
	
	public static Byte FloatToByte(Float value) {
		if (value == null) {
			return null;
		}
		return new Byte((byte)value.floatValue());
	}
	
	public static Short FloatToShort(Float value) {
		if (value == null) {
			return null;
		}
		return new Short((short)value.floatValue());
	}
	
	public static Byte DoubleToByte(Double value) {
		if (value == null) {
			return null;
		}
		return new Byte((byte)value.doubleValue());
	}
	
	public static Short DoubleToShort(Double value) {
		if (value == null) {
			return null;
		}
		return new Short((short)value.doubleValue());
	}
}
